package com.dianping.cat.home.storage.entity;

import com.dianping.cat.home.storage.BaseEntity;
import com.dianping.cat.home.storage.IVisitor;
import java.util.LinkedHashMap;
import java.util.Map;





public class StorageGroup
  extends BaseEntity<StorageGroup>
{
  private String m_id;
  private Link m_link;
/* 17 */   private Map<String, Storage> m_storages = new LinkedHashMap();





/* 23 */   public StorageGroup(String id) { this.m_id = id; }




/* 28 */   public void accept(IVisitor visitor) { visitor.visitStorageGroup(this); }


  public StorageGroup addStorage(Storage storage) {
/* 32 */     this.m_storages.put(storage.getId(), storage);
/* 33 */     return this;
  }


  public boolean equals(Object obj) {
/* 38 */     if (obj instanceof StorageGroup) {
/* 39 */       StorageGroup _o = (StorageGroup)obj;

/* 41 */       if (!equals(getId(), _o.getId())) {
/* 42 */         return false;
      }

/* 45 */       return true;
    }

/* 48 */     return false;
  }


/* 52 */   public Storage findStorage(String id) { return (Storage)this.m_storages.get(id); }



/* 56 */   public String getId() { return this.m_id; }



/* 60 */   public Link getLink() { return this.m_link; }



/* 64 */   public Map<String, Storage> getStorages() { return this.m_storages; }



  public int hashCode() {
/* 69 */     int hash = 0;

/* 71 */     return hash * 31 + ((this.m_id == null) ? 0 : this.m_id.hashCode());
  }





/* 78 */   public void mergeAttributes(StorageGroup other) { assertAttributeEquals(other, "storage-group", "id", this.m_id, other.getId()); }




/* 83 */   public Storage removeStorage(String id) { return (Storage)this.m_storages.remove(id); }


  public StorageGroup setId(String id) {
/* 87 */     this.m_id = id;
/* 88 */     return this;
  }

  public StorageGroup setLink(Link link) {
/* 92 */     this.m_link = link;
/* 93 */     return this;
  }

  public StorageGroup() {}
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/storage/entity/StorageGroup.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */